<?php /* Smarty version Smarty-3.0.8, created on 2012-10-27 07:14:00
         compiled from "G:\xampp\htdocs\gy78/template\front/article.html" */ ?>
<?php /*%%SmartyHeaderCode:6456508b1938f2c593-28705997%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '01fdeb11c47c3d16eb9939bc68a6f5445dde6d29' => 
    array (
      0 => 'G:\\xampp\\htdocs\\gy78/template\\front/article.html',
      1 => 1351206784,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '6456508b1938f2c593-28705997',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_modifier_date_format')) include 'G:\xampp\htdocs\gy78\SpeedPHP\Drivers\Smarty\plugins\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>光仪78同学会</title>
        <meta name="description" content="你的首页描述" />
        <meta name="keywords" content="你首页关键字" />
        <link rel="stylesheet" href="template/front/style.css" type="text/css" media="screen" />
        <script type="text/javascript" src="/resources/scripts/jquery-1.7.1.min.js"></script>
    </head>

    <body>
        <div id="fullwrapper">
            <div class="wrap">
                <div class="header">
                    <div class="logo">
                        <h3><a href="http://www.gy78.org">光仪78同学会</a>那个同学的美好时光</h3>
                    </div>
                    <div >
                        <ul id="topnav" class="nav">
                            <li id="menu-item-47" class=""><a href="/">首页</a></li>
                            <li id="menu-item-34" class=""><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'category','id'=>1),$_smarty_tpl);?>
">文章</a></li>
                            <li id="menu-item-33" class=""><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'category','id'=>2),$_smarty_tpl);?>
">照片</a></li>
                            <li id="menu-item-35" class=""><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'category','id'=>3),$_smarty_tpl);?>
">诗人</a></li>
                            <li id="menu-item-50" class=""><a href="<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'page','id'=>13),$_smarty_tpl);?>
">关于</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="wrap">
                <div id="content" role="main">
                    <div class="content_top conleft"></div>
                    <div class="post" id="post-<?php echo $_smarty_tpl->getVariable('post')->value['id'];?>
">
                        <h2><?php echo $_smarty_tpl->getVariable('post')->value['title'];?>
</h2>
                        <div class="post_intro"> <span>作者：<?php echo $_smarty_tpl->getVariable('post')->value['author'];?>
 日期：<?php echo $_smarty_tpl->getVariable('post')->value['created'];?>
  阅读：<?php echo $_smarty_tpl->getVariable('post')->value['count'];?>
   </span> </div>
                        <div class="content_date">
                            <div class="datebg"> <span class="day"><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('post')->value['created'],"%d");?>
</span> <span><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('post')->value['created'],"%m");?>
</span> <span><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('post')->value['created'],"%Y");?>
</span> </div>
                        </div>
                        <div class="comments"> <span class="cmt_num"><a href="#comment-<?php echo $_smarty_tpl->getVariable('comments')->value['0']['comment_ID'];?>
" title="《<?php echo $_smarty_tpl->getVariable('post')->value['title'];?>
》上的评论"><?php echo $_smarty_tpl->getVariable('commentscount')->value;?>
</a></span> </div>
                        <div class="entry">
                            <p><?php echo $_smarty_tpl->getVariable('post')->value['text'];?>
</p>
                            <p>&nbsp;</p>
                        </div>
                        <h4 id="comments" class="clear"><?php echo $_smarty_tpl->getVariable('commentscount')->value;?>
 篇评论</h4>
                        <ol class="commentlist" id="commentlist">
                            <?php  $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('comments')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
?>
                            <li class="comment  depth-1" id="comment-<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
"   >
                                <div id="div-comment-<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
" class="commentmetadata" style="margin-left:<?php echo $_smarty_tpl->tpl_vars['item']->value['level']*30;?>
px;">
                                    <ul class="comminfo clear">
                                        <li><img src="template/front/images/tou.png" width="32" height="32" alt="" /></li>
                                        <li class="atxt"><span><?php echo $_smarty_tpl->tpl_vars['item']->value['screenname'];?>
</span><p>发表于<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_date'];?>
</p></li>
                                    </ul>
                                    <ul  class="reply">
                                        <li>  <?php if ($_smarty_tpl->getVariable('userinfo')->value==true){?><?php if ($_smarty_tpl->getVariable('userinfo')->value['screenname']==$_smarty_tpl->tpl_vars['item']->value['comment_author']){?><a class="comment-edit-link" href="#" title="编辑评论">编辑</a><?php }?><?php }?>
                                            <a  id="reply-<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
" href='#comment-<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
' onclick='return addCommentmoveForm("<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_parent'];?>
", "<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
", "respond", "<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_post_ID'];?>
")'>回复</a>
                                            <a id="cancle-<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
" href='#comment-<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
' onclick='return cancleCommentmoveForm("0", "<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_ID'];?>
", "respond", "<?php echo $_smarty_tpl->tpl_vars['item']->value['comment_post_ID'];?>
")' style="display:none">取消</a>
                                        </li>
                                    </ul>
                                    <ul class="commtext clear">
                                        <p><?php echo $_smarty_tpl->tpl_vars['item']->value['comment_content'];?>
</p>
                                    </ul>
                                </div>
                            </li>
                            <?php }} ?>
                        </ol>



                        <div id="respond">
                            <h4 class="clear">发表我的评论</h4>


                            <form action="" method="post" id="commentform">
                                <?php if ($_smarty_tpl->getVariable('userinfo')->value==true){?>
                                <p class="smilies">当前您登录的用户名为 <?php echo $_smarty_tpl->getVariable('userinfo')->value['screenname'];?>
 </p>
                                <?php }else{ ?>
                                <p class="smilies">您需要登录后发表评论 </p>
                                <?php }?>
                                <p><textarea name="comment_content" id="comment_content" cols="5" rows="10" tabindex="4" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('submit').click();return false};"></textarea></p>
                                <p><input name="submit" type="submit" id="submit" tabindex="5" class="subin" value="" />
                                    <input type='hidden' name='comment_post_ID' value='<?php echo $_smarty_tpl->getVariable('id')->value;?>
' id='comment_post_ID' />
                                    <input type='hidden' name='comment_parent' id='comment_parent' value='0' />
                                    <input type='hidden' name='comment_author' id='comment_author' value='<?php echo $_smarty_tpl->getVariable('userinfo')->value['name'];?>
' />
                                </p>
                            </form>
                            <input type='hidden' name='logined' id='logined' value='<?php if ($_smarty_tpl->getVariable('userinfo')->value==true){?>1<?php }else{ ?>0<?php }?>' />
                            <input type='hidden' name='anchor' id='anchor' value='<?php echo $_smarty_tpl->getVariable('anchor')->value;?>
' />

                        </div>
                    </div>
                    <div class="content_foot conleft"></div>

                </div>
                <?php $_template = new Smarty_Internal_Template("front/sidebar.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>
            </div>  	 <!-- end wrap  -->
            <?php $_template = new Smarty_Internal_Template("front/footer.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate(); $_template->rendered_content = null;?><?php unset($_template);?>
        </div>


    </body>
</html>
<script type="text/javascript">
    $(document).ready(function(){
        window.location.hash='comment-'+$("#anchor").val();
        $("#submit").click(function(){
            if ($("#logined").val()==0)
            {	  			alert('您需要登录后才能发表评论！');
                return false;

            }

            if($.trim($("#comment_content").val())==''){
                alert('评论内容不能为空！');
                return false
            };
            $.post("<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'commentsave'),$_smarty_tpl);?>
",$("#commentform").serialize(),function(msg){
                window.location.href='/index.php?c=main&a=article&id='+$("#comment_post_ID").val()+'&anchor='+$("#comment_parent").val();
                //		window.location.href=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['spUrl'][0][0]->__template_spUrl(array('c'=>'main','a'=>'article'),$_smarty_tpl);?>
'comment-19';
            }
            ,'json');
            return false
        })	   ;

    });
    function addCommentmoveForm(comment_parent,comment_id,respond,post_id){
        $("a[id^='cancle-']").hide();
        $("a[id^='reply-']").show();
        $("#reply-"+comment_id).hide();
        $("#cancle-"+comment_id).show();
        $("#comment-"+comment_id).append($("#"+respond));
        $("#comment_post_ID").val(post_id);
        $("#comment_parent").val(comment_id)
    };
    function cancleCommentmoveForm(comment_parent,comment_id,respond,post_id){
        $("#reply-"+comment_id).show();
        $("#cancle-"+comment_id).hide();
        $("#commentlist").append($("#respond"));
        $("#comment_post_ID").val(post_id);
        $("#comment_parent").val(0)
    }
</script>
